{% extends 'base.html' %}
{% load crispy_forms_tags %}

{% block title %}
    <title>Edit post</title>
{% endblock title %}

<h1>Edit post</h1>
{% block content %}
    <form method="POST">
        {% csrf_token %}
        {{ form|crispy }}
        <button type="submit" class="btn btn-primary">Save changes</button>
        <form class="d-inline" method="POST" action="{% url 'blogs:post_delete' form.instance.id %}">
            {% csrf_token %}
            <button type="submit" class="btn btn-danger">Delete</button>
        </form>
    </form>
{% endblock %}
